Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: setHeader in Web Service Consumer (Java)
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Application Development
Platform: Windows
Release: 8.5.2
Reproducible: Always

I am trying to create a web service consumer on Notes 8.5.2. I am trying to add authentication headers (username and password), but the Stub setHeader method "is not visible" according to the DDE message. Sure enough, when I try to use the type-ahead, lotus.domino.axis.client.Stub does not seem to have a setHeader method.

What am I missing? How can I set the head in 8.5.2?

It worked on 7.0.3 using Stubby. (Had a different problem there with the service call parameter being sent in the header instead of the body, which I am hoping 8.5.2 will solve).

I've searched this forum and all over the web, but have been unable to find a solution. Any help would greatly appreciated.

---begin code---

import lotus.domino.*;
import Request_Management.*;
import javax.xml.soap.*;
import lotus.domino.axis.client.Stub;
import lotus.domino.axis.message.SOAPHeaderElement;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();

// (Your code goes here)
Request_ManagementServiceLocator locator = new Request_ManagementServiceLocator();
Request_ManagementPortType service = locator.getRequest_ManagementSoap();
Stub ws;
SOAPHeaderElement oHeaderElement;
SOAPElement oElement;

lotus.domino.axis.client.Stub s = (lotus.domino.axis.client.Stub) service;
SOAPHeaderElement header = new SOAPHeaderElement("urn:AuthenticationInfo", "AuthenticationInfo");
SOAPElement node = header.addChildElement("userName");
node.addTextNode("User Name");
SOAPElement node2 = header.addChildElement("password");
node2.addTextNode("password123");
s.setHeader(header); //this is where it tells me "not visible"

String reqID = "R2:000000001234";
String res = service.opGet(reqID).getRequestor();
System.out.println(res);

} catch(Exception e) {
e.printStackTrace();
}
}
}


---end code---


Feedback number WEBB89ZPXM created by ~Olga Cisremarakol on 10/07/2010

Status: Open
Comments:

setHeader in Web Service Consumer (... (~Olga Cisremara... 7.Oct.10)
. . setHeader in Web Service Consumer (... (~Judy Fezweberg... 22.Feb.11)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS